clc;clear;
LN=500;
L=8;
W=0.25;
SNR =0;
for n=1:1:10
    n
    [b2_0_b(n),RSEND_1] = basictral (LN,L,SNR);
    [b2_0_a(n),RSEND_2] = basicrcos(LN,L,SNR);
    [b2_0_c(n),RSEND_3] = bpskrcos (LN,L,SNR,W);
    [b2_0_d(n),RSEND_4] = DSkuopin (LN,L,SNR,W);
    
    y1(:,n) = periodogram(RSEND_1);
    y2(:,n) = periodogram(RSEND_2);
    y3(:,n) = periodogram(RSEND_3);
    y4(:,n) = periodogram(RSEND_4);
end

yy1 =y1';
yy2 =y2';
yy3 =y3';
yy4 =y4';
Y1=sum(yy1)/10;
Y2=sum(yy2)/10;
Y3=sum(yy3)/10;
Y4=sum(yy4)/10;
plot(Y1/max(Y1));
hold on;
plot (Y2/max(Y2));
plot (Y3/max (Y3));
plot (Y4/max(Y4));
hold off;